package com.ruoyi.address.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.time.LocalDate;

/**
 * 用户地址管理对象 user_address_info
 *
 * @author amy
 * @date 2025-06-16
 */
@Schema(description = "用户地址管理对象")
public class UserAddressInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    /** 自增ID */
    @Schema(title = "自增ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 用户ID */
    @Schema(title = "用户ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /** 收货人 */
    @Schema(title = "收货人")
    @Excel(name = "收货人")
    private String consignee;

    /** 联系电话 */
    @Schema(title = "联系电话")
    @Excel(name = "联系电话")
    private String contactPhone;

    /** 地址信息 */
    @Schema(title = "地址信息")
    @Excel(name = "地址信息")
    private String address;

    /** 标签 */
    @Schema(title = "标签")
    @Excel(name = "标签")
    private String addressType;

    /** 默认地址标志 */
    @Schema(title = "默认地址标志")
    @Excel(name = "默认地址标志")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long defaultFlag;

    /** 创建人 */
    @Schema(title = "创建人")
    private String createdBy;

    /** 创建时间 */
    @Schema(title = "创建时间")
    private LocalDate createdTime;

    /** 更新人 */
    @Schema(title = "更新人")
    private String updatedBy;

    /** 更新时间 */
    @Schema(title = "更新时间")
    private LocalDate updatedTime;

    /** 删除标志 0-未删除 1-已删除 */
    @Schema(title = "删除标志 0-未删除 1-已删除")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deletedFlag;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }


    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }


    public void setConsignee(String consignee) 
    {
        this.consignee = consignee;
    }

    public String getConsignee() 
    {
        return consignee;
    }


    public void setContactPhone(String contactPhone) 
    {
        this.contactPhone = contactPhone;
    }

    public String getContactPhone() 
    {
        return contactPhone;
    }


    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }


    public void setAddressType(String addressType) 
    {
        this.addressType = addressType;
    }

    public String getAddressType() 
    {
        return addressType;
    }


    public void setDefaultFlag(Long defaultFlag) 
    {
        this.defaultFlag = defaultFlag;
    }

    public Long getDefaultFlag() 
    {
        return defaultFlag;
    }


    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }


    public void setCreatedTime(LocalDate createdTime) 
    {
        this.createdTime = createdTime;
    }

    public LocalDate getCreatedTime() 
    {
        return createdTime;
    }


    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }


    public void setUpdatedTime(LocalDate updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public LocalDate getUpdatedTime() 
    {
        return updatedTime;
    }


    public void setDeletedFlag(Long deletedFlag) 
    {
        this.deletedFlag = deletedFlag;
    }

    public Long getDeletedFlag() 
    {
        return deletedFlag;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("consignee", getConsignee())
            .append("contactPhone", getContactPhone())
            .append("address", getAddress())
            .append("addressType", getAddressType())
            .append("defaultFlag", getDefaultFlag())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .append("deletedFlag", getDeletedFlag())
            .toString();
    }
}
